<template>
	<view>
		<home v-if="PageCur=='home'"></home>
		<diary v-if="PageCur=='diary'"></diary>
		<my v-if="PageCur=='my'"></my>
		<view class="cu-bar tabbar bg-white shadow foot">
			<view class="action" @click="NavChange" data-cur="home">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/home' + [PageCur=='home'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='home'?'text-pink':'text-gray'" class="light">首页</view>
			</view>
			<view class="action" @click="NavChange" data-cur="diary">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/diary' + [PageCur=='diary'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='diary'?'text-pink':'text-gray'" class="light">日记</view>
			</view>
			<view class="action" @click="NavChange" data-cur="my">
				<view class='cuIcon-cu-image'>
					<image :src="'/static/tabbar/my' + [PageCur=='my'?'_cur':''] + '.png'"></image>
				</view>
				<view :class="PageCur=='my'?'text-pink':'text-gray'" class="light">我的</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				PageCur: 'home',
			}
		},
		methods: {
			NavChange: function(e) {
				this.PageCur = e.currentTarget.dataset.cur
			}
		}
	}
</script>

<style>

</style>
